delete __dirname
delete __filename
ActiveXObject = undefined

window = global
window.top = window
window.addEventListener = function (res) {
    console.log('window中的addEventListener：', res)
}


location = {
    "ancestorOrigins": {},
    "href": "https://www.nmpa.gov.cn/datasearch/home-index.html",
    "origin": "https://www.nmpa.gov.cn",
    "protocol": "https:",
    "host": "www.nmpa.gov.cn",
    "hostname": "www.nmpa.gov.cn",
    "port": "",
    "pathname": "/datasearch/home-index.html",
    "search": "",
    "hash": ""
}
div = {
    getElementsByTagName: function (res) {
        console.log('div中的getElementsByTagName：', res)
        if (res === 'i') {
            return {}
        }

    }
}
script = {
    0: {},
    1: {}
}
meta = [
    {
        http_equiv: 'Content-Type',
        content: 'text/html; charset=utf-8'
    },
    {
        getAttribute: function (res) {
            console.log('meta中的getAttribute：', res)
            if (res === 'r') {
                return 'm'
            }
        },
        parentNode: {
            removeChild: function (res) {
                console.log('meta中的removeChild：', res)
                // return content
            }
        },
        content: "content_code"
    }
]
document = {
    createElement: function (res) {
        console.log('document中的createElement：', res)
        if (res === 'div') {
            return div
        }
        if (res === 'a') {
            return {}
        }
        if(res == 'form'){
            return {id:"",action:""}
        }
        if(res == 'input'){
            return {id:""}
        }
    },
    getElementsByTagName: function (res) {
        console.log('document中的getElementsByTagName：', res)
        if (res === 'script') {
            return script
        }
        if (res === 'meta') {
            return meta
        }
        if (res === 'base') {
            return {length: 0}
        }
    },
    getElementById: function (res) {
        console.log('document中的getElementById：', res)
        if (res === 'root-hammerhead-shadow-ui') {
            return null
        }
    },
    addEventListener: function (res) {
        console.log('document中的addEventListener：', res)
    }
}

navigator = {
    userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36'
}

setInterval = function () {}
setTimeout = function () {}


ts_code

func_code

function get_cookie() {
    return document.cookie
}


